import java.util.ArrayList;
import java.util.List;

/**
 * @author hu-zhi-jun
 * @date: 2021-06-02
 */
public class MybatisGenerator {

    public  void generator()  throws Exception {

            List<String> warnings = new ArrayList<String>();
            boolean overwrite = true;
          //  File configFile = ResourceUtils.getFile("classpath:mbg.xml");
          //  File configFile = ResourceUtils.getFile("classpath:mbg.xml");
//            File configFile = new File("C:\\Users\\admin\\Desktop\\shop\\mybatis-generator\\src\\main\\resources\\mbg.xml");
//            ConfigurationParser cp = new ConfigurationParser(warnings);
//            Configuration config = cp.parseConfiguration(configFile);
//            DefaultShellCallback callback = new DefaultShellCallback(overwrite);
//            MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
//            myBatisGenerator.generate(null);

    }

    public static void main(String[] args)  {
        try {
            MybatisGenerator generatorSqlmap = new MybatisGenerator();
            generatorSqlmap.generator();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
